package tech.runchen.gz5055.oms.modules.system.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 商品标签条码表
 * </p>
 *
 * @author zzj
 * @since 2023-10-19
 */
@Getter
@Setter
@TableName("barcode_tb")
@ApiModel(value = "BarcodeEntity对象", description = "商品标签条码表")
public class BarcodeEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("创建人")
    private String createBy;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新人")
    private String updateBy;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("条码标签ID（第三方）")
    private String barcodeId;

    @ApiModelProperty("商品ID")
    private Long productId;

    @ApiModelProperty("商品信息")
    private String productInfo;

    @ApiModelProperty("商品条码")
    private String barcode;

    @ApiModelProperty("批次")
    private String batch;

    @ApiModelProperty("有效期")
    private Long lifespan;

    @ApiModelProperty("存入用户")
    private Long inboundUserId;

    @ApiModelProperty("取用时间")
    private Long outboundTime;

    @ApiModelProperty("取出用户")
    private Long outboundUserId;

    @ApiModelProperty("取用地址")
    private Long outboundAddressId;

    @ApiModelProperty("绑定的订单ID")
    private Long orderId;

    @ApiModelProperty("患者名称")
    private String userPatientName;

    @ApiModelProperty("患者卡号")
    private String userPatientCode;

    @ApiModelProperty("使用状态（0-正常 1-出库 2-已使用")
    private Integer status;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("商品信息")
    @TableField(exist = false)
    private ProductEntity product;
}
